package com.stylefeng.guns.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 员工积分
 * </p>
 *
 * @author rockjh
 * @since 2018-01-31
 */
@TableName("emp_points")
public class EmpPoints extends Model<EmpPoints> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
	@TableId(value="id", type= IdType.UUID)
	private String id;
    /**
     * 员工编码
     */
	@TableField("emp_code")
	private String empCode;
    /**
     * 员工姓名
     */
	@TableField("emp_name")
	private String empName;
    /**
     * 年费
     */
	private String year;
    /**
     * 模块积分json
     */
	@TableField("modular_ponit")
	private String modularPonit;
    /**
     * 总积分
     */
	@TableField("total_point")
	private Double totalPoint;


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getEmpCode() {
		return empCode;
	}

	public void setEmpCode(String empCode) {
		this.empCode = empCode;
	}

	public String getEmpName() {
		return empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public String getModularPonit() {
		return modularPonit;
	}

	public void setModularPonit(String modularPonit) {
		this.modularPonit = modularPonit;
	}

	public Double getTotalPoint() {
		return totalPoint;
	}

	public void changeTotalPoint(Double change) {
		this.totalPoint=this.totalPoint + change;
	}

	public void setTotalPoint(Double totalPoint) {
		this.totalPoint = totalPoint;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "EmpPoints{" +
			"id=" + id +
			", empCode=" + empCode +
			", empName=" + empName +
			", year=" + year +
			", modularPonit=" + modularPonit +
			", totalPoint=" + totalPoint +
			"}";
	}
}
